Skip to content

RDKEMW-24199: Fixed GetKnownSSIDs for expected response - #348

Closed
me-ha-p wants to merge 14 commits into
developfrom
feature/RDKEMW-24199
Closed

RDKEMW-24199: Fixed GetKnownSSIDs for expected response#348
me-ha-p wants to merge 14 commits into
developfrom
feature/RDKEMW-24199

Conversation

@me-ha-p

@me-ha-p me-ha-p commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com

mpalan315 and others added 4 commits September 3, 2026 18:36
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Copilot AI lite review requested due to automatic review settings September 8, 2026 12:31
@me-ha-p
me-ha-p requested a review from a team as a code owner September 8, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current handling of “no known SSIDs” can incorrectly return a list containing an empty string ([""]) instead of an empty list ([]), which is a behavioral bug for API consumers.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the NetworkManager plugin’s “known SSIDs” retrieval to return saved WiFi profile information even when the device is disconnected (notably on RDKV), by switching the RDK backend to query the paired/saved SSID rather than the currently connected SSID.

Changes:

  • Add an IARM API identifier for retrieving the saved/paired SSID on RDK (getPairedSSID).
  • Update the RDK implementation of GetKnownSSIDs to call getPairedSSID instead of getConnectedSSID.
  • Adjust the GNOME implementation of GetKnownSSIDs to always build an iterator (even when no SSIDs are found).
File summaries
File Description
plugin/rdk/NetworkManagerRDKProxy.h Adds the new IARM API string constant for getPairedSSID.
plugin/rdk/NetworkManagerRDKProxy.cpp Switches GetKnownSSIDs to use the paired/saved SSID IARM call.
plugin/gnome/NetworkManagerGnomeProxy.cpp Refactors GetKnownSSIDs iterator creation flow when the known-SSID list is empty.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugin/gnome/NetworkManagerGnomeProxy.cpp
Comment thread plugin/rdk/NetworkManagerRDKProxy.cpp
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Copilot AI review requested due to automatic review settings September 9, 2026 05:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Both RDK and GNOME paths can return a single empty-string SSID ([""]) instead of an empty list when no SSID is available, which is incorrect output for an SSID list.

Review details

Suppressed comments (2)

plugin/rdk/NetworkManagerRDKProxy.cpp:1051

  • GetKnownSSIDs currently unconditionally pushes the returned pairedSsid.ssid into ssidList. If the IARM call succeeds but there is no paired SSID (empty string), this will serialize as [""] instead of an empty list, which is not a valid SSID value and can confuse clients.
                auto &pairedSsid = param.data.getPairedSSID;
                std::list<string> ssidList;
                ssidList.push_back(string(pairedSsid.ssid));

plugin/gnome/NetworkManagerGnomeProxy.cpp:773

  • When ssidList is empty, this code inserts an empty string element. That will make the RPC/JSON response contain [""] instead of an empty array, which is semantically different and treats "no SSIDs" as a single SSID with an empty name.
                if (ssidList.empty())
                {
                    NMLOG_INFO("known ssids not found !");
                    ssidList.push_back(string());
                }
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

DevikaJaladi and others added 4 commits September 10, 2026 19:08
Reason for change: Remove explicit rescan request upon wake-up(NSM-ON).
Test Procedure: Change the channel in AP or change the timeout for SAE GTK_REKEY when the box is in DeepSleep & wake-up; ensure WiFi reconnected with 10s; wake-up journey.
Priority: P1
Risks: Low

Signed-off-by: Devika Jaladi <djalad690@cable.comcast.com>
Co-authored-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Release of 4.1.0
…3s to 1s (#345)

* RDKEMW-23908: Reduce default ping count (3->1), timeout (3s->1s), interval (0.2s->0.002s)

Reason for change: Current Ping method is synchronous and blocks other method
calls while ping is executing. This fix is a mitigation. A proper fix requires
methods like Ping that trigger long-running operations to be asynchronous.
Test Procedure: Refer ticket
Risks: Low
Signed-off-by: Tony_Ukken2@comcast.com
Co-authored-by: Karunakaran A <48997923+karuna2git@users.noreply.github.com>
Co-authored-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Release of 4.2.0
@karuna2git karuna2git changed the title RDKEMW-24199: GetKnownSSIDs in RDKV returning Empty upon Disconnected RDKEMW-24199: Fixed GetKnownSSIDs for expected response Sep 11, 2026
mpalan315 and others added 5 commits September 11, 2026 18:39
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Reason for change: GetKnownSSIDs must return stored WiFi Profile information.
Priority: P2
Test Procedure: Refer ticket
Risks: Low

Signed-off-by: Mehavarshni_Palaniswamy@comcast.com
Copilot AI review requested due to automatic review settings September 11, 2026 18:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved RDK reconnect, Ping interval, empty-list handling, and IARM status issues remain.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (3)

plugin/NetworkManagerImplementation.cpp:559

  • -i 0.002 requests a 2 ms interval. For counts greater than one this can burst up to 500 packets per second, and standard iputils rejects intervals below 200 ms for unprivileged callers, so Ping can either fail or create an avoidable CPU/network burst. Keep a supported interval or explicitly cap/validate the request and privilege requirements before using such a value.
                snprintf(cmd, sizeof(cmd), "ping6 -c %d -W %d -i 0.002 '%s' 2>&1", noOfRequest, timeOutInSeconds, endpoint.c_str());
            }
            else
            {
                snprintf(cmd, sizeof(cmd), "ping  -c %d -W %d -i 0.002 '%s' 2>&1", noOfRequest, timeOutInSeconds, endpoint.c_str());

plugin/NetworkManagerJsonRpc.cpp:585

  • The title and description only cover the RDK GetKnownSSIDs fix, but this hunk changes Ping defaults; the same diff also changes the ping interval and wake-up scan behavior. These are independent runtime changes not represented in the stated test procedure or low-risk assessment. Please split them into scoped changes or update the description, risk, and tests to cover them.
                uint32_t noOfRequest = 1;
                uint16_t timeOutInSeconds = 1;

plugin/gnome/NetworkManagerGnomeProxy.cpp:773

  • The newly added empty-list branch does not handle the no-profile case with the current backend: wifiManager::getKnownSSIDs returns false when ssids is empty (NetworkManagerGnomeWIFI.cpp:1850-1858), so execution never reaches this block and the API still returns success:false. Propagate an empty list as a successful result from the backend, and keep it empty rather than adding a non-existent SSID.
                if (ssidList.empty())
                {
                    NMLOG_INFO("known ssids not found !");
                    ssidList.push_back(string());
                }
  • Files reviewed: 11/11 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment on lines 1692 to 1694
NMLOG_INFO("OnPowerModeChanged: waking from DeepSleep, requesting DHCP lease on wlan0");
if (ReacquireDHCPLease("wlan0") != Core::ERROR_NONE)
{
/* Must add new method to get all the known SSIDs but for now RDK-NM supports only one saved SSID. */
retVal = IARM_Bus_Call(IARM_BUS_NM_SRV_MGR_NAME, IARM_BUS_WIFI_MGR_API_getPairedSSID, (void *)&param, sizeof(param));

if(retVal == IARM_RESULT_SUCCESS)
@karuna2git karuna2git closed this Sep 11, 2026
@karuna2git
karuna2git deleted the feature/RDKEMW-24199 branch September 11, 2026 23:42
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants